package cn.zjz.day01.demo03Array;

public class Demo05ArrayReverse {
    public static void main(String[] args) {
        int[] arr={1,2,3,4,5,6,7,8,9};
        int low=0,high=arr.length-1;
        while(low<high){
            int temp=arr[low];
            arr[low++]=arr[high];
            arr[high--]=temp;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
    }
}
